package cn.jiyun.service.impl;

import cn.jiyun.dao.StudentMapper;
import cn.jiyun.pojo.Student;
import cn.jiyun.service.StudentService;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {
@Autowired
private StudentMapper studentMapper;


    @Override
    public PageInfo findPage(Integer pageIndex, Map searchMap) {
        PageHelper.startPage(pageIndex,1);
        List<Map> list = studentMapper.findAll(searchMap);
        return new PageInfo(list);
    }
}
